package com.mjh.zhujianju.enums;

/**
 * @author: Alex
 * @version: V1.0
 * @project: zhujianju
 * @package: com.mjh.zhujianju.enums
 * @description: description
 * @date: 2018/8/28
 * @time: 下午2:40
 */
public enum EvaluateEnum {

	SATISFY("1","满意"),
	BASIC_SATISFY("2","基本满意"),
	UNSATISFY("3","不满意");


	private String code;
	private String name;

	EvaluateEnum(String code, String name) {
		this.code = code;
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public static BusinessEnum[] getEnums(){
		return BusinessEnum.values();
	}

	public static String getName(String code){
		if(code == null){
			return null;
		}

		for (EvaluateEnum evaluateEnum : EvaluateEnum.values()){
			if(code.equals(evaluateEnum.getCode())){
				return evaluateEnum.getName();
			}
		}

		return null;
	}
}
